﻿using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace vueweb
{
    public class ActionMyDescriptionAttribute: Attribute, IFilterMetadata
    {
     
        public string Description
        {
            get;
            private set;
        }
        public LogType Logtype;//声明枚举  

        public ActionMyDescriptionAttribute(string 功能描述, LogType 访问)
        {
            this.Description = 功能描述;
            this.Logtype = 访问;
           
        }

        public static explicit operator ActionMyDescriptionAttribute(FilterDescriptor v)
        {
            return v.Filter as ActionMyDescriptionAttribute;
        }
    }

   
    public enum LogType//声明枚举  
    {
        访问,
        操作,
        异常,
        其他
    }
}
